package com.hospital.ecard.xmlutils;

/**
 * @author lvyao
 * @description 转xml基类
 * @date 2020/7/1
 */
public class BaseSoapXmlUtils {
    public static StringBuffer getBaseSoapXmlUtils(String methodName, String entityBody) {
        StringBuffer cardInfoXmlStr = new StringBuffer();
        cardInfoXmlStr.append("<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:card=\"http://www.sxhealth.gov.cn/card\">\n");
        cardInfoXmlStr.append("   <soapenv:Header/>\n");
        cardInfoXmlStr.append("   <soapenv:Body>\n");
        cardInfoXmlStr.append("      <card:" + methodName + ">\n");
        cardInfoXmlStr.append(entityBody);
        cardInfoXmlStr.append("      </card:" + methodName + ">\n");
        cardInfoXmlStr.append("   </soapenv:Body>\n");
        cardInfoXmlStr.append("</soapenv:Envelope>");
        return cardInfoXmlStr;
    }
}
